import { Injectable } from '@nestjs/common';
import { CreateTestDto } from './dto/create-test.dto';
import { UpdateTestDto } from './dto/update-test.dto';
import { InjectModel } from '@nestjs/mongoose';
import { User } from 'src/db/schemas/user.schema';
import { Model } from 'mongoose';
import { ConfigService } from '@nestjs/config';

@Injectable()
export class TestService {
	constructor(
		@InjectModel(User.name)
		private userModel: Model<User>,
		private configService: ConfigService
	){}
	create(createTestDto: CreateTestDto) {
		return 'This action adds a new test';
	}

	findAll() {
		let count = 0;
		for (let i = 0; i < 1000000; i++) {
			count++;
		}
		return `This action returns all test`;
	}

	findOne(id: number) {
		return `This action returns a #${id} test`;
	}

	update(id: number, updateTestDto: UpdateTestDto) {
		return `This action updates a #${id} test`;
	}

	remove(id: number) {
		return `This action removes a #${id} test`;
	}
}
